package cn.gameo2o.controller.lcsh;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cn.gameo2o.service.lcsh.LiuChenShenHeService;
import cn.gameo2o.util.PageParam;

/**
 * 流程审核
 * @author 张嘉辉
 *
 */
@RestController
@RequestMapping("/liuchengshenhe")
public class LiuChenShenHeController {

	@Resource()
	private LiuChenShenHeService liuchengshenheService;

	public LiuChenShenHeService liuchengshenheService() {
	     return liuchengshenheService;
	}

	public void setliuchengshenheService(LiuChenShenHeService liuchengshenheService) {
	      this.liuchengshenheService = liuchengshenheService;
	 }

	 @RequestMapping("/findAll")
	    public PageParam findAll(@RequestParam(required = false) String hdmc,@RequestParam(required = false) String hdzt,@RequestParam(required = false) String shzt,@RequestParam() Integer limit,@RequestParam() Integer offset){
	          Map params=new HashMap<String,String>();
	          if(hdmc!=null) {
	              params.put("hdmc", hdmc);
	          }
	          if(hdzt!=null&&!"".equals(hdzt)){
	              params.put("hdzt",hdzt);
	          }
	          if(shzt!=null&&!"".equals(shzt)){
	              params.put("shzt",shzt);
	          }

	          PageParam page=new PageParam();
	          page.setPageSize(limit);
	          page.setFirst(offset);
	          liuchengshenheService.findlc(params, page);
	          return page;
	    }
	
}